﻿using CommunityToolkit.Mvvm.ComponentModel;
using S7.Net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace PLCNET5_11_9.Data
{
    public class MainModel : ObservableObject
    {

        private bool _plc31, _plc33, _plc35,_plc37;
        private bool _s2000_1z, _s2000_2z, _s2000_3z, _s2000_4z, _s2000_5z;
        private bool _s7500_1g, _s7500_2g, _s7500_3g, _s7500_4g, _s7500_5g;
        private bool _s2000_1t, _s2000_2t, _s2000_3t, _s2000_4t, _s2000_5t, _s2000_6t, _s2000_7t;
        private bool _sy1, _sy2, _sy3, _sy4, _sy5, _sy6, _sy7, _sy8, _sy9, _sy10, _sy11, _sy12, _sy13;
        private bool _sgw1, _sgw2, _sgw3;
        private int _ai_data;
        private float _biao1_data1 = 9999.99f, _biao1_data2, _biao1_data3;
        private float _biao2_data1 = 9999.99f, _biao2_data2, _biao2_data3;
        private float _biao3_data1 = 9999.99f, _biao3_data2, _biao3_data3;
        private float _biao4_data1 = 9999.99f, _biao4_data2, _biao4_data3;
        private float _biao5_data1 = 9999.99f, _biao5_data2, _biao5_data3;
        private float _biao6_data1 = 9999.99f, _biao6_data2, _biao6_data3;


        private string _plc31Image, _plc33Image, _plc35Image, _plc37Image;
        private string _s2000_1zImage, _s2000_2zImage, _s2000_3zImage, _s2000_4zImage, _s2000_5zImage;
        private string _s7500_1gImage, _s7500_2gImage, _s7500_3gImage, _s7500_4gImage, _s7500_5gImage;
        private string _s2000_1tImage, _s2000_2tImage, _s2000_3tImage, _s2000_4tImage, _s2000_5tImage, _s2000_6tImage, _s2000_7tImage;
        private string _sy1Image, _sy2Image, _sy3Image, _sy4Image, _sy5Image, _sy6Image, _sy7Image, _sy8Image, _sy9Image, _sy10Image, _sy11Image, _sy12Image, _sy13Image;
        private string _sgw1Image, _sgw2Image, _sgw3Image;


        public int Ai_data { get { return _ai_data; } set { SetProperty(ref _ai_data, value); } }

        public float Biao1_data1 { get { return _biao1_data1; } set { SetProperty(ref _biao1_data1, value); } }
        public float Biao2_data1 { get { return _biao2_data1; } set { SetProperty(ref _biao2_data1, value); } }
        public float Biao3_data1 { get { return _biao3_data1; } set { SetProperty(ref _biao3_data1, value); } }
        public float Biao4_data1 { get { return _biao4_data1; } set { SetProperty(ref _biao4_data1, value); } }
        public float Biao5_data1 { get { return _biao5_data1; } set { SetProperty(ref _biao5_data1, value); } }
        public float Biao6_data1 { get { return _biao6_data1; } set { SetProperty(ref _biao6_data1, value); } }

        public float Biao1_data2 { get { return _biao1_data2; } set { SetProperty(ref _biao1_data2, value); } }
        public float Biao2_data2 { get { return _biao2_data2; } set { SetProperty(ref _biao2_data2, value); } }
        public float Biao3_data2 { get { return _biao3_data2; } set { SetProperty(ref _biao3_data2, value); } }
        public float Biao4_data2 { get { return _biao4_data2; } set { SetProperty(ref _biao4_data2, value); } }
        public float Biao5_data2 { get { return _biao5_data2; } set { SetProperty(ref _biao5_data2, value); } }
        public float Biao6_data2 { get { return _biao6_data2; } set { SetProperty(ref _biao6_data2, value); } }

        public float Biao1_data3 { get { return _biao1_data3; } set { SetProperty(ref _biao1_data3, value); } }
        public float Biao2_data3 { get { return _biao2_data3; } set { SetProperty(ref _biao2_data3, value); } }
        public float Biao3_data3 { get { return _biao3_data3; } set { SetProperty(ref _biao3_data3, value); } }
        public float Biao4_data3 { get { return _biao4_data3; } set { SetProperty(ref _biao4_data3, value); } }
        public float Biao5_data3 { get { return _biao5_data3; } set { SetProperty(ref _biao5_data3, value); } }
        public float Biao6_data3 { get { return _biao6_data3; } set { SetProperty(ref _biao6_data3, value); } }



        public bool Plc31 { get { return _plc31; } set { SetProperty(ref _plc31, value); string _imagesource = Plc31Image; Plc31Image = _imagesource; } }
        public bool Plc33 { get { return _plc33; } set { SetProperty(ref _plc33, value); string _imagesource = Plc33Image; Plc33Image = _imagesource; } }
        public bool Plc35 { get { return _plc35; } set { SetProperty(ref _plc35, value); string _imagesource = Plc35Image; Plc35Image = _imagesource; } }
        public bool Plc37 { get { return _plc37; } set { SetProperty(ref _plc37, value); string _imagesource = Plc37Image; Plc37Image = _imagesource; } }


        public bool S2000_1z { get { return _s2000_1z; } set { SetProperty(ref _s2000_1z, value); string _imagesource = S2000_1zImage; S2000_1zImage = _imagesource; } }
        public bool S2000_2z { get { return _s2000_2z; } set { SetProperty(ref _s2000_2z, value); string _imagesource = S2000_2zImage; S2000_2zImage = _imagesource; } }
        public bool S2000_3z { get { return _s2000_3z; } set { SetProperty(ref _s2000_3z, value); string _imagesource = S2000_3zImage; S2000_3zImage = _imagesource; } }
        public bool S2000_4z { get { return _s2000_4z; } set { SetProperty(ref _s2000_4z, value); string _imagesource = S2000_4zImage; S2000_4zImage = _imagesource; } }
        public bool S2000_5z { get { return _s2000_5z; } set { SetProperty(ref _s2000_5z, value); string _imagesource = S2000_5zImage; S2000_5zImage = _imagesource; } }
        public bool S7500_1g { get { return _s7500_1g; } set { SetProperty(ref _s7500_1g, value); string _imagesource = S7500_1gImage; S7500_1gImage = _imagesource; } }
        public bool S7500_2g { get { return _s7500_2g; } set { SetProperty(ref _s7500_2g, value); string _imagesource = S7500_2gImage; S7500_2gImage = _imagesource; } }
        public bool S7500_3g { get { return _s7500_3g; } set { SetProperty(ref _s7500_3g, value); string _imagesource = S7500_3gImage; S7500_3gImage = _imagesource; } }
        public bool S7500_4g { get { return _s7500_4g; } set { SetProperty(ref _s7500_4g, value); string _imagesource = S7500_4gImage; S7500_4gImage = _imagesource; } }
        public bool S7500_5g { get { return _s7500_5g; } set { SetProperty(ref _s7500_5g, value); string _imagesource = S7500_5gImage; S7500_5gImage = _imagesource; } }

        public bool S2000_1t { get { return _s2000_1t; } set { SetProperty(ref _s2000_1t, value); string _imagesource = S2000_1tImage; S2000_1tImage = _imagesource; } }
        public bool S2000_2t { get { return _s2000_2t; } set { SetProperty(ref _s2000_2t, value); string _imagesource = S2000_2tImage; S2000_2tImage = _imagesource; } }
        public bool S2000_3t { get { return _s2000_3t; } set { SetProperty(ref _s2000_3t, value); string _imagesource = S2000_3tImage; S2000_3tImage = _imagesource; } }
        public bool S2000_4t { get { return _s2000_4t; } set { SetProperty(ref _s2000_4t, value); string _imagesource = S2000_4tImage; S2000_4tImage = _imagesource; } }
        public bool S2000_5t { get { return _s2000_5t; } set { SetProperty(ref _s2000_5t, value); string _imagesource = S2000_5tImage; S2000_5tImage = _imagesource; } }
        public bool S2000_6t { get { return _s2000_6t; } set { SetProperty(ref _s2000_6t, value); string _imagesource = S2000_6tImage; S2000_6tImage = _imagesource; } }
        public bool S2000_7t { get { return _s2000_7t; } set { SetProperty(ref _s2000_7t, value); string _imagesource = S2000_7tImage; S2000_7tImage = _imagesource; } }

        public bool Sy1 { get { return _sy1; } set { SetProperty(ref _sy1, value); string _imagesource = Sy1Image; Sy1Image = _imagesource; } }
        public bool Sy2 { get { return _sy2; } set { SetProperty(ref _sy2, value); string _imagesource = Sy2Image; Sy2Image = _imagesource; } }
        public bool Sy3 { get { return _sy3; } set { SetProperty(ref _sy3, value); string _imagesource = Sy3Image; Sy3Image = _imagesource; } }
        public bool Sy4 { get { return _sy4; } set { SetProperty(ref _sy4, value); string _imagesource = Sy4Image; Sy4Image = _imagesource; } }
        public bool Sy5 { get { return _sy5; } set { SetProperty(ref _sy5, value); string _imagesource = Sy5Image; Sy5Image = _imagesource; } }
        public bool Sy6 { get { return _sy6; } set { SetProperty(ref _sy6, value); string _imagesource = Sy6Image; Sy6Image = _imagesource; } }
        public bool Sy7 { get { return _sy7; } set { SetProperty(ref _sy7, value); string _imagesource = Sy7Image; Sy7Image = _imagesource; } }
        public bool Sy8 { get { return _sy8; } set { SetProperty(ref _sy8, value); string _imagesource = Sy8Image; Sy8Image = _imagesource; } }
        public bool Sy9 { get { return _sy9; } set { SetProperty(ref _sy9, value); string _imagesource = Sy9Image; Sy9Image = _imagesource; } }
        public bool Sy10 { get { return _sy10; } set { SetProperty(ref _sy10, value); string _imagesource = Sy10Image; Sy10Image = _imagesource; } }
        public bool Sy11 { get { return _sy11; } set { SetProperty(ref _sy11, value); string _imagesource = Sy11Image; Sy11Image = _imagesource; } }
        public bool Sy12 { get { return _sy12; } set { SetProperty(ref _sy12, value); string _imagesource = Sy12Image; Sy12Image = _imagesource; } }
        public bool Sy13 { get { return _sy13; } set { SetProperty(ref _sy13, value); string _imagesource = Sy13Image; Sy13Image = _imagesource; } }

        public bool Sgw1 { get { return _sgw1; } set { SetProperty(ref _sgw1, value); string _imagesource = Sgw1Image; Sgw1Image = _imagesource; } }
        public bool Sgw2 { get { return _sgw2; } set { SetProperty(ref _sgw2, value); string _imagesource = Sgw2Image; Sgw2Image = _imagesource; } }
        public bool Sgw3 { get { return _sgw3; } set { SetProperty(ref _sgw3, value); string _imagesource = Sgw3Image; Sgw3Image = _imagesource; } }


        public string Plc31Image { get { return _plc31 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _plc31Image, value); } }

        public string Plc33Image { get { return _plc33 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _plc33Image, value); } }

        public string Plc35Image { get { return _plc35 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _plc35Image, value); } }

        public string Plc37Image { get { return _plc37 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _plc37Image, value); } }


        public string S2000_1zImage { get { return _s2000_1z ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_1zImage, value); } }
        public string S2000_2zImage { get { return _s2000_2z ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_2zImage, value); } }
        public string S2000_3zImage { get { return _s2000_3z ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_3zImage, value); } }
        public string S2000_4zImage { get { return _s2000_4z ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_4zImage, value); } }
        public string S2000_5zImage { get { return _s2000_5z ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_5zImage, value); } }
        public string S7500_1gImage { get { return _s7500_1g ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s7500_1gImage, value); } }
        public string S7500_2gImage { get { return _s7500_2g ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s7500_2gImage, value); } }
        public string S7500_3gImage { get { return _s7500_3g ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s7500_3gImage, value); } }
        public string S7500_4gImage { get { return _s7500_4g ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s7500_4gImage, value); } }
        public string S7500_5gImage { get { return _s7500_5g ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s7500_5gImage, value); } }

        public string S2000_1tImage { get { return _s2000_1t ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_1tImage, value); } }
        public string S2000_2tImage { get { return _s2000_2t ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_2tImage, value); } }
        public string S2000_3tImage { get { return _s2000_3t ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_3tImage, value); } }
        public string S2000_4tImage { get { return _s2000_4t ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_4tImage, value); } }
        public string S2000_5tImage { get { return _s2000_5t ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_5tImage, value); } }
        public string S2000_6tImage { get { return _s2000_6t ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_6tImage, value); } }
        public string S2000_7tImage { get { return _s2000_7t ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _s2000_7tImage, value); } }

        public string Sy1Image { get { return _sy1 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy1Image, value); } }
        public string Sy2Image { get { return _sy2 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy2Image, value); } }
        public string Sy3Image { get { return _sy3 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy3Image, value); } }
        public string Sy4Image { get { return _sy4 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy4Image, value); } }
        public string Sy5Image { get { return _sy5 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy5Image, value); } }
        public string Sy6Image { get { return _sy6 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy6Image, value); } }
        public string Sy7Image { get { return _sy7 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy7Image, value); } }
        public string Sy8Image { get { return _sy8 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy8Image, value); } }
        public string Sy9Image { get { return _sy9 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy9Image, value); } }
        public string Sy10Image { get { return _sy10 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy10Image, value); } }
        public string Sy11Image { get { return _sy11 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy11Image, value); } }
        public string Sy12Image { get { return _sy12 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy12Image, value); } }
        public string Sy13Image { get { return _sy13 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sy13Image, value); } }

        public string Sgw1Image { get { return _sgw1 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sgw1Image, value); } }
        public string Sgw2Image { get { return _sgw2 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sgw2Image, value); } }
        public string Sgw3Image { get { return _sgw3 ? "pack://application:,,,/Asset/an7.png" : "pack://application:,,,/Asset/an8.png"; } set { SetProperty(ref _sgw3Image, value); } }


    }
}
